Skip to content

[pull] master from mozilla:master - #509

Merged
pull[bot] merged 6 commits into
code:masterfrom
mozilla:master
Aug 21, 2026
Merged

[pull] master from mozilla:master#509
pull[bot] merged 6 commits into
code:masterfrom
mozilla:master

Conversation

@pull

@pull pull Bot commented Aug 21, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

calixteman and others added 6 commits August 19, 2026 15:26
…055455)

Improve the formula for centering glyphs in text fields and use the same shift for the single-line and the comb paths.
…etBytes`

The `getBytes` methods will *always* return a Uint8Array[1], and remember that even an empty TypedArray is truthy (i.e. `!!new Uint8Array(0) === true`).
Hence we can remove a few pointless checks from the `DecryptStream` and `RunLengthStream` classes, which should improve code readability a tiny bit.

---

[1] See [stream.js](https://github.com/mozilla/pdf.js/blob/e051279385c5cf141935037b340e757081052990/src/core/stream.js#L45-L51), [chunked_stream.js](https://github.com/mozilla/pdf.js/blob/e051279385c5cf141935037b340e757081052990/src/core/chunked_stream.js#L184-L193), and [decode_stream.js](https://github.com/mozilla/pdf.js/blob/e051279385c5cf141935037b340e757081052990/src/core/decode_stream.js#L86-L110).
…ecompiling font-data

This avoids creating "duplicate" `TextDecoder`/`TextEncoder` instances.
For example, when rendering all 1310 pages of the `pdf.pdf` document (from the test-suite) this patch reduces the number of `TextDecoder`/`TextEncoder` instances from `73` *each* to just a single one each.

*Note:* Compared to PR 21801 the reduction is obviously much smaller, however it still seems worthwhile to avoid unnecessary object creation.
Remove a few unnecessary checks after calling `BaseStream.prototype.getBytes`
…TextDecoder-TextEncoder

Cache the `TextDecoder`/`TextEncoder` instances used when compiling/decompiling font-data
Vertically center the text in single-line and comb text fields (bug 2055455)
@pull pull Bot locked and limited conversation to collaborators Aug 21, 2026
@pull pull Bot added the ⤵️ pull label Aug 21, 2026
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot merged commit d63ef00 into code:master Aug 21, 2026
4 of 20 checks passed
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
@pull
pull Bot had a problem deploying to code-coverage August 21, 2026 02:03 Failure
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants